Getting work done while:
Preemption is roughly othogonal from multitasking.
#define MAX_CHANNEL 8
#define MAX_MESSAGE 14
main() {
uchar channel; // current channel
uchar temperature; // temperature reading
char message[MAX_MESSAGE]; // character message initialize chip
for(channel=0;TRUE;++channel){ //foreverloop
if (channel >= MAX_CHANNEL) {
channel = 0;
}
temperature = ReadAD(channel);
FormatTemperature(temperature, message);
SendMessage(message);
Delay(60 seconds);
}
}